<template>
	<view class="u-p-30">
		<view class="combox">
			<view class="">
				<view class="u-font-18 f-w">
					身份证正反面
				</view>
				<view class="u-flex  u-flex-center u-m-30">
					<image :src="userInfo.idFront" mode="aspectFill"
						style="width: 300px;height: 180px;text-align: center;"
						@click.stop="showImage(userInfo.idFront)"></image>
				</view>
				<view class="u-flex  u-flex-center u-m-30">
					<image :src="userInfo.idBack" mode="aspectFill"
						style="width:300px;height: 180px;text-align: center;" @click.stop="showImage(userInfo.idBack)">
					</image>
				</view>
				<view class="u-font-18 f-w">
					证明照片
				</view>
				<view class="u-flex  u-flex-center u-m-30">
					<image :src="userInfo.shotImg" mode="aspectFill"
						style="width:300px;hei ght: 180px;text-align: center;" @click.stop="showImage(userInfo.shotImg)">
					</image>
				</view>
			</view>
			<view class="combox">
				<u--form labelPosition="left" :model="userInfo" ref="uForm">
					<u-form-item label="姓名:" label-width='70' prop="name" borderBottom ref="item1">
						<u--input v-model="userInfo.name" border="none" placeholder='请输入姓名' readonly></u--input>
					</u-form-item>
					<u-form-item label="身份证号:" label-width='70' prop="identity" borderBottom ref="item1">
						<u--input v-model="userInfo.identity" border="none" placeholder='请输入身份证' readonly></u--input>
					</u-form-item>
				</u--form>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {
					identity: '',
					idFront: '',
					idBack: '',
					name: '',
				}
			}
		},
		created() {
			this.getUserInfo()
		},
		methods: {
			showImage(pic){
				uni.previewImage({
					urls:[pic]
				})
			},
			getUserInfo() {
				this.$api.getUserInfoApi().then((res) => {
					if (res.code == 200) {
						this.userInfo = res.data
						this.userName = res.data.name
					}
				})
			}
		}
	}
	
	
</script>
<style lang="scss" scoped>

</style>